Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs for shared_from_slice From impls #82041

Merged
merged 1 commit into from
Feb 13, 2021

Conversation

notriddle
Copy link
Contributor

The advantage of making these docs is mostly in pointing out that these
functions all make new allocations and copy/clone/move the source into them.

These docs are on the function, and not the impl block, to avoid showing
the "[+] show undocumented items" button.

CC #51430

@rust-highfive
Copy link
Collaborator

r? @m-ou-se

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 12, 2021
Copy link
Member

@m-ou-se m-ou-se left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, this is great.

Small nit: Can you put the doc comments above the #[inline] attribute? We usually put the doc comment first and keep the attributes close to the function signature.

The advantage of making these docs is mostly in pointing out that these
functions all make new allocations and copy/clone/move the source into them.

These docs are on the function, and not the `impl` block, to avoid showing
the "[+] show undocumented items" button.

CC rust-lang#51430
@notriddle
Copy link
Contributor Author

Okay, the #[inline] attributes are now moved.

@m-ou-se
Copy link
Member

m-ou-se commented Feb 12, 2021

Thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 12, 2021

📌 Commit 7fafa4d has been approved by m-ou-se

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 12, 2021
@m-ou-se m-ou-se added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Feb 12, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 13, 2021
Rollup of 8 pull requests

Successful merges:

 - rust-lang#81811 (Fix doc test for Vec::retain(), now passes clippy::eval_order_dependence)
 - rust-lang#81900 (Organize trait test files)
 - rust-lang#81995 (Fix suggestion to introduce explicit lifetime)
 - rust-lang#82031 (Drop an unnecessary intermediate variable)
 - rust-lang#82033 (Refactor `get_word_attr` to return only `Option`)
 - rust-lang#82040 (Add test to prevent src link regression)
 - rust-lang#82041 (Add docs for shared_from_slice From impls)
 - rust-lang#82050 (Added tests to drain an empty vec)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 2673026 into rust-lang:master Feb 13, 2021
@rustbot rustbot added this to the 1.52.0 milestone Feb 13, 2021
@notriddle notriddle deleted the shared-from-slice-docs branch March 2, 2021 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants